Skip to main content
Version: 2.x.x

URL Parameters

The types generated from the endpoint value string are extremely useful. Thanks to this, our command is able to suggest the required parameters to execute the query itself.


Example

const getUser = builder.createCommand<ResponseType>()({
endpoint: "/users/:userId",
});

getUser.send({ params: { userId: 1 } });
// Or
getUser.setParams({ userId: 1 }).send();